home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business & Presentations
/
Business and Presentations - Volume 1 (1995)(Sideface)(NL).iso
/
hputils
/
bitfnt38
/
bitfnt38.doc
next >
Wrap
Text File
|
1988-06-01
|
25KB
|
482 lines
BITFNT38, Copyright 1988 by Bruce J. Patin. All rights reserved.
This DOC file and the associated EXE and BFC files may be freely
distributed.
Bitfont is a program which can be used to design or modify fonts of
bit-mapped characters. Using a configuration file as a template,
font files for a wide variety of printers and graphics programs
can be read in, modified by Bitfont, then written out to a new file.
Bitfont itself has graphics capabilities to display characters
with either discrete or overlapping dots, and there are many
menu-driven functions which can be used to quickly modify entire
fonts.
A configuration file must be created for each font file format,
using what is actually a simple programming language.
The rules of this programming language are given later on in this
document. A sample configuration file is HPLAJET2.BFC,
which can be used to read and write fonts compatible with the
Hewlett Packard LaserJet II printer.
Another sample file is NLQDRAFT.BFC, which can be used with the
NLQ printer, which is supposed to be compatible with the Epson FX-85.
It is possible to design and save individual characters without
a configuration file, by writing the bit pattern to the file in hex
or in the form of a matrix of 1's and 0's or X's and spaces.
The desired form can be selected from the Save or Load displays.
To execute Bitfont, simply type in the name of the EXE file, BITFNT38.EXE.
If there is a configuration file by the name of BITFONT.BFC in the
current directory, this will automatically be loaded.
If not, you will need to select CF on the Parameter Display to
specify and load in a configuration file in order to read and write
fonts. When you select a configuration file to be loaded, BITFNT38
will read it in, condense it, write it to the current directory as
BITFONT.BFC, and then reread it from BITFONT.BFC in its condensed form.
This makes future invocations of BITFNT38 faster.
The menus of the Bitfont program should be self-explanatory, with
possibly a little experimentation. Mouse support for the design screen
has not yet been implemented, but should be unnecessary for most
purposes, since the cursor keys and surrounding keys and menu commands
are very effectively implemented for the purpose of designing characters.
Bitfont has been written in Turbo Pascal 4.0.
The source code is available for $120.
For answers to any questions or a copy of the source code, send a note
to:
Bruce J. Patin
4225 N. Henderson Drive #101
Arlington, VA 22203
Sorry, I do not accept phone calls.
*************************************************************************
I/O Configuration File:
This file is composed of entries for each field of the font file.
Each configuration entry is composed of one or more subfields,
separated by commas. The configuration entry is ended by a semicolon.
The entire set of configuration entries is ended by a period.
There may be more than one set of configurations in a file.
They are identified by an ID and Name in the Start Config entry.
The first subfield is the Type and optional Modifier.
Other possible subfields are Termination, Termchar, Length, Start,
Varid, Name, String, all explained as follows.
Note that the format of an entry may vary, depending on
whether it is used for input (load) or output (save).
Comments and whitespace may be included anywhere in the
configuration file. Comments must be enclosed in curly brackets.
If the very first character is an asterisk (*), then it is
assumed that the whitespace and comments are removed (compacted).
When a configuration file is first loaded in, it is automatically
saved in bitfont.bfc in the compacted form, so that next time
bitfont is started, the most recent configuration loaded will be
quickly and efficiently loaded automatically.
*************************************************************************
The format of each entry in the configuration file is given as follows
in parentheses, according to the type of entry.
(Do not include the parentheses when actually coding the configuration.)
In general, the entry type is indicated by the first character in the
entry.
Section Types: (in the order in which they should be used)
N - start configuration set initialization. (N:Name;)
Only assignments (types A,T,X) may occur between N and E.
E - end initialization section.
KI - start input font header.
EI - end input font header.
L1 - label 1 (see below for labels) to indicate start of character.
ESL - end character search, character loaded.
(ignored if loading entire font)
KT - start input font trailer.
ET - end input font trailer.
KS - start character search program, to search for an input character.
This is needed for loading in a selected character only.
Routine here should contain a jump to L1.
ESU - end character search program (unsuccessful search)
KO - start output font header.
EO - end output font header.
KC - start output character, for when character is being appended.
EC - end output character.
KZ - start output font trailer.
EZ - end output font trailer.
KP - start download.
EP - stop download.
. - a period after the last semicolon ends the configuration set.
Diagnostic types:
# - (#:Varid,Message;) sends Message and value of Varid to terminal.
#R - Same as #, but waits for you to hit return.
#A - Sends Message and waits for you to enter a value to assign to Varid.
$ - Same as #, except any value is displayed and entered in hex.
(the value is limited to FF, one byte's worth)
Branching types:
Zn - Set length limit.
(Zn:Length;) Length is a value expression.
After each configuration entry, the number of bytes read from
the font input file is checked, and a skip to label n is done
if the number of bytes transferred from the font file, after Zn,
is equal to or greater than Length, at which time the length
limitation is reset.
R - Reset length limit;
Ln - label n. n is a decimal number, maximum value of 99.
Jn - Jump on condition to label n.
n may be a value expression, allowing for a "computed goto".
(Jn:Value1,Operator,Value2;)
Operator may be:
GT - Greater than.
LT - Less than.
EQ - Equal to.
GE - Greater than or equal to.
LE - Less than or equal to.
NE - Not equal to.
Assignment types:
A - Assignment only. (A:Varid=Value,Name;)
A maximum of 128 variables, including predetermined can be assigned.
T - Assignment of a string of text characters to a variable.
There may be a maximum of 8 of these.
The Text must be enclosed in double quotes.
(T:Varid=Text,Name;)
X - Assignment of an optional variable for which each character
descriptor has its own value. (X:Varid=Value,Name;)
There may be a maximum of 6 of these, none of which may be strings.
All variables of this type must be assigned with X before they
can be used elsewhere.
P - Position input font file at Value position. (P:Value;)
C - Code select (C;); used only during save operations.
This selects the variables and data for the character having
a code equal to the previously set value of CC.
If CC is not a valid code, then the next higher code is selected.
If there is no valid higher code, CC is set to 0.
G - the character bit data string. (G:Start,Length;)
Start and Length are optional Value expressions.
The default is the entire string, of length calculated
using the currently assigned width, height and data format.
For counting purposes, the first data byte is byte 0.
'G' may have an optional modifier 'H', 'D' or 'B' to indicate that
bytes are expressed in hex, decimal, or binary, and the additional
submodifier 'S' may be used to indicate that the hi and lo order
bytes of each pair of bytes is to be swapped.